<div class="wrapper wrapper-content animated ">
    <div class="row">
    <div class="col-md-2">
        <div class="ibox">
            <div class="ibox-title"><h5>{$page_title}目录</h5>
                <div class="ibox-tools"><a class="refresh-tree">刷新</a></div>
            </div>
            <div class="">
                <div id="left-tree" class="right_centent" data-url="{:url('MaterialCategory/get_list_tree')}"> </div>
            </div>
        </div>
    </div>
    <div class="col-md-10">
        <div class="ibox float-e-margins">
            <div class="ibox-title"><h5>{$page_title}列表</h5></div>
            <div class="ibox-content table-responsive">
                <div class="row">
                    <form id="pagerForm" method="post" class="form-inline searchForm">
                        <input type="hidden" name="pid" value="">
                        <div class="col-sm-3 m-b-xs">
                            <a class="btn btn-default refresh-tree"> <i class="fa fa-refresh"> </i>刷新</a>
                            <lqf_link><a class="btn btn-info ajax-open add-btn" data-url="{:url('MaterialCategory/add')}"
                                         data-title="用户"><i class="fa fa-plus"></i>添加</a></lqf_link>
                        </div>
                        <div class="col-sm-9 m-b-xs text-right">
                            <div class="input-group">
                                <input type="text" name="keywords" placeholder="输入主题关键字搜索" class="form-control">
                            </div>
                            <div class="input-group">
                                                    <span class="input-group-btn">
                                                    <button type="button" class="btn btn-primary ajaxSearchForm"><i
                                                            class="fa fa-search"></i> 搜索</button>
                                                    </span>
                            </div>
                        </div>
                    </form>
                </div>
                <table class="table table-hover sorttable ajax-list-table" data-url="{:url('MaterialCategory/show_json')}">
                    <thead>
                    <tr>
                        <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                        <th width="200">名称</th>
                        <th width="200">图片</th>
                        <th width="200">介绍</th>
                        <th width="80">排序</th>
                        <th width="80" class="text-center">启用</th>
                        <th width="80" class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                    <tfoot class="ibox-content">
                    <tr>
                        <td colspan="7" align="center"></td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
    </div>
</div>
<link href="__STATIC__/module/admin/js/plugins/bootstrap-treeview/bootstrap-treeview.min.css" rel="stylesheet">
<script src="__STATIC__/module/admin/js/plugins/bootstrap-treeview/bootstrap-treeview.js"></script>

<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) {
    visible='';
    if(data[i]['visible']=='1') visible='checked';
    %>
    <tr>
        <td><input name="user_id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td><%=data[i]['name']%></td>
        <td>
            <a class="fancybox" href="<%=data[i]['litpic']%>" title="图片1">
                <img src="<%=data[i]['litpic']%>" width="100">
            </a>
        </td>
        <td><%=data[i]['intro']%></td>
        <td><input type="text" name="sort" value="<%=data[i]['sort']%>" class="form-control w50 ajax-sort" data-url="{:url('MaterialCategory/set_sort',array('name'=>'sort'))}" data-id="<%=data[i]['id']%>" size="5"></td>
        <td class="text-center">
            <input name="visible" class="ajax-checkbox" type="checkbox"   data-url="{:url('MaterialCategory/set_visible',array('name'=>'visible'))}"  data-id="<%=data[i]['id']%>" <%=visible%> >
        </td>
        <td class="text-center">
            <lqf_link><a class="ajax-open" data-url="{:url('MaterialCategory/edit')}" data-ids="{'id':'<%=data[i]['id']%>'}">修改</a></lqf_link>
            <lqf_link><a class="ajax-del confirm" data-url="{:url('MaterialCategory/del')}" data-ids="{'id':'<%=data[i]['id']%>'}">删除</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<link href="__STATIC__/module/admin/js/plugins/bootstrap-treeview/bootstrap-treeview.min.css" rel="stylesheet">
<script src="__STATIC__/module/admin/js/plugins/bootstrap-treeview/bootstrap-treeview.js"></script>
<script src="__STATIC__/module/admin/js/lib/treeview.js"></script>

<!-- Fancy box -->
<script src="__STATIC__/module/admin/js/plugins/fancybox/jquery.fancybox.js"></script>
<link href="__STATIC__/module/admin/js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
<script>
    $(document).ready(function () {
        $('.fancybox').fancybox({
            openEffect: 'none',
            closeEffect: 'none'
        });
    });
</script>